<div id="editServiceModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
     aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-body">
                <h3 class="m-t-none m-b ">修改服务</h3>
                <div class="ibox-content">
                    <div>
                        <div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">服务名称</label>
                                <div class="col-sm-10">
                                    <input v-model="editServiceInfo.name" type="text" placeholder="必填，请填写服务名称"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">服务编码</label>
                                <div class="col-sm-10">
                                    <input v-model="editServiceInfo.serviceCode" type="text" placeholder="必填，请填写服务编码"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">消息队列</label>
                                <div class="col-sm-10">
                                    <input v-model="editServiceInfo.messageQueueName" type="text"
                                           placeholder="选填，请填写消息队列" class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">是否实例</label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="editServiceInfo.isInstance">
                                        <option selected disabled value="">必填，请填写是否实例</option>
                                        <option value="T">微服务处理</option>
                                        <option value="Y">是</option>
                                        <option value="N">否</option>
                                        <option value="NT">透传</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group row" v-if="editServiceInfo.isInstance == 'T'" >
                                <label class="col-sm-2 col-form-label">调用服务</label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="editServiceInfo.url">
                                        <option selected disabled value="">必填，请选择调用服务</option>
                                        <option v-for="(item,index) in editServiceInfo.services" :key="index" :value="item.statusCd">{{item.name}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group row" v-else>
                                <label class="col-sm-2 col-form-label">调用地址</label>
                                <div class="col-sm-10">
                                    <input v-model="editServiceInfo.url" type="text" placeholder="选填，请填写调用地址"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">调用方式</label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="editServiceInfo.method">
                                        <option selected disabled value="">必填，请选择调用方式</option>
                                        <option value="GET">http get</option>
                                        <option value="POST">http post</option>
                                    </select></div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">超时时间</label>
                                <div class="col-sm-10">
                                    <input v-model="editServiceInfo.timeout" type="text" placeholder="必填，请填写超时时间"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">重试次数</label>
                                <div class="col-sm-10">
                                    <input v-model="editServiceInfo.retryCount" type="text" placeholder="必填，请填写重试次数"
                                           class="form-control">
                                </div>
                            </div>

                            <div class="ibox-content">
                                <button class="btn btn-primary float-right" type="button" v-on:click="editService()"><i
                                        class="fa fa-check"></i>&nbsp;保存
                                </button>
                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
                                        data-dismiss="modal">取消
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
